class UserSqlMap(object):
    LAST_NOTICE = "select t1.notice_id,t1.content,t1.notice_time,t2.status_name,t1.title,t3.real_name,t4.name as position_name from aoa_notice_list as t1 inner join aoa_status_list as t2 on t1.status_id=t2.status_id inner join aoa_user as t3 on t1.user_id=t3.user_id inner join aoa_position as t4 on t3.position_id=t4.position_id order by t1.notice_time desc limit 0,1"
    UNFINISHED_TASK_LIST = "select t1.reciver_user as implement,t1.task_describe,t1.task_id,t1.star_time,t1.end_time,t4.real_name,t3.status_name,t1.title,t1.progress_speed,t1.priority_level from aoa_task_list as t1 inner join aoa_status_list as t3 on t1.status_id=t3.status_id inner join aoa_user as t4 on t1.task_push_user_id=t4.user_id where (t1.implement='{user_name}' or t1.implement like '{user_name};%' or t1.implement like '%;{user_name};%' or t1.implement like '%;{user_name}' or t1.reciverlist='{user_name}' or t1.task_push_user_id={user_id}) and (t3.status_name='未开始' or t3.status_name='进行中')"
    UNFINISHED_TASK_NUM = "select count(t1.task_id) as unfinished_task_num from aoa_task_list as t1 inner join aoa_status_list as t3 on t1.status_id=t3.status_id where (t1.implement='{user_name}' or t1.implement like '{user_name};%' or t1.implement like '%;{user_name};%' or t1.implement like '%;{user_name}' or t1.reciverlist='{user_name}' or t1.task_push_user_id={user_id}) and (t3.status_name='未开始' or t3.status_name='进行中')"
    my_unreviewed = "select t3.shenuserzhi,t4.real_name,t3.process_name,t2.status_name,t3.deeply_id,t3.type_name,t3.apply_time,t3.status_id from aoa_reviewed as t1 inner join aoa_status_list as t2 on t1.status_id=t2.status_id inner join aoa_process_list as t3 on t1.pro_id=t3.process_id inner join aoa_user as t4 on t3.process_user_id=t4.user_id where t1.user_id={user_id} and t2.status_name='未处理'"

    FIND_NAME = "SELECT user_id,user_name,real_name FROM aoa_user WHERE user_id={user_id}"
    check_user_name = "select t1.real_name,t1.user_name,t1.dept_id,t2.dept_name,t1.position_id,t3.name as position_name from aoa_user as t1 inner join aoa_dept as t2 on t1.dept_id=t2.dept_id inner join aoa_position as t3 on t1.position_id = t3.position_id where user_id={user_id}"


    FILTER_PARAMS = {
        "query_str": "t1.title like '%{query_str}%'"
    }